home *** CD-ROM | disk | FTP | other *** search
/ System Booster / System Booster.iso / Archives / StartupTools / LoadKickC0.lha / LoadKickC0 / src / CreateRelocTab.c < prev    next >
C/C++ Source or Header  |  1992-01-03  |  1KB  |  33 lines

  1. /****************************************************************************
  2. *                                                                           *
  3. * LoadKickC0 V1.1 -- Copyright 1992 by Matthias Scheler                     *
  4. *                                                                           *
  5. *      This program may be freely copied, as long as all copyright          *
  6. *      notices are left intact and unchanged.                               *
  7. *                                                                           *
  8. ****************************************************************************/
  9.  
  10. #include <exec/types.h>
  11.  
  12. #include <stdio.h>
  13. #include <stdlib.h>
  14.  
  15. extern ULONG rtable[];
  16.  
  17. void main(void)
  18.  
  19. {
  20.  FILE *AsmFile;
  21.  int Index;
  22.  
  23.  if ((AsmFile=fopen("reloc16.asm","w"))==NULL) exit (10);
  24.  fprintf (AsmFile,"\n\tCSECT text,0\n\n\tXDEF RelocTab16\nRelocTab16:\n");
  25.  
  26.  fprintf (AsmFile,"\tdc.w $%04x\n",rtable[0]);
  27.  Index=0;
  28.  while (rtable[++Index])
  29.   fprintf (AsmFile,"\tdc.w $%04x\n",rtable[Index]-rtable[Index-1]);
  30.  
  31.  fprintf (AsmFile,"\tdc.w 0\n\n\tEND\n");
  32. }
  33.